import { axios as request }  from '@/utils/request'

export function getList({params}) {
  return request({
    url: 'api/region',
    method: 'get',
    params
  })
}

export function get({id}) {
  const cityCode = id
  return request({
    url: `api/region/${cityCode}`,
    method: 'get'
  })
}

export function add({data}) {
  return request({
    url: 'api/region',
    method: 'post',
    data
  })
}

export function edit({data}) {
  return request({
    url: 'api/region',
    method: 'put',
    data
  })
}

export function del(cityCode) {
  return request({
    url: `api/region/${cityCode}`,
    method: 'delete'
  })
}
